home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1782 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: news.flashnet.it!usenet
  2. From: Alessandro_Consoli@amp.flashnet.it
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Gadgets problem...
  5. Date: Sun, 21 Jan 96 03:39:15 CET
  6. Organization: AMP-BBS
  7. Message-ID: <19960121.751B970.365A@amp.flashnet.it>
  8. NNTP-Posting-Host: amp.flashnet.it
  9.  
  10.  
  11. Hi All,
  12.  
  13. Try look in this code...there is a bug in code or in intuition???
  14. The problem is: intuition or gadtools seems to be deadlock
  15.  
  16. 8<-8<-8<-8<-8<-8<-8<-8<-8<- cut cut cut 8<-8<-8<-8<-8<-8<-8<-8<-
  17.  
  18. glist_PTR
  19. dc.l
  20. 0
  21. Gad1_1
  22.  
  23. dc.l
  24. 0
  25. Gad1_2
  26.  
  27. dc.l
  28. 0
  29. Gad1_3
  30.  
  31. dc.l
  32. 0
  33.  
  34.     
  35. lea
  36. glist_PTR,a0
  37.  
  38. CALL
  39. CreateContext,GadT_Base
  40.  
  41. tst.l
  42. d0
  43.  
  44. beq
  45. Free_VInfo
  46.  
  47.  
  48. move.l  d0,Gad1_1
  49.  
  50.  
  51. moveq
  52. #BUTTON_KIND,d0
  53.  
  54. move.l
  55. Gad1_1,a0
  56.  
  57. lea
  58. Gadget_1,a1
  59.  
  60. move.l
  61. VInfo,Gad1_VInfo
  62.  
  63. suba.l
  64. a2,a2
  65.  
  66. CALL
  67. CreateGadgetA,GadT_Base
  68.  
  69. tst.l
  70. d0
  71.  
  72. beq
  73. Free_VInfo
  74.  
  75. move.l  d0,Gad1_2
  76.  
  77.  
  78. ; Nuovo e..precedente
  79.  
  80.  
  81. move.l
  82. Win1_PTR,a0
  83.  
  84. move.l
  85. Gad1_2,a1
  86.  
  87. move.w
  88. #-1,d0
  89.  
  90.  
  91.  
  92. ; Aggiungi in coda!
  93.  
  94. CALL
  95. AddGadget,Int_Base
  96.  
  97.  
  98. move.l
  99. Gad1_1,a0
  100.  
  101. move.l
  102. Win1_PTR,a1
  103.  
  104. suba.l
  105. a2,a2
  106.  
  107. move.w
  108. #-1,d0
  109.  
  110. CALL
  111. RefreshGList,Int_Base
  112.  
  113.  
  114. move.l
  115. Win1_PTR,a0
  116.  
  117. suba.l
  118. a1,a1
  119.  
  120. CALL
  121. GT_RefreshWindow,GadT_Base
  122.  
  123.  
  124. ;-
  125.  
  126. moveq
  127. #BUTTON_KIND,d0
  128.  
  129. move.l
  130. Gad1_2,a0
  131.  
  132. lea
  133. Gadget_2,a1
  134.  
  135. move.l
  136. VInfo,Gad2_VInfo
  137.  
  138. suba.l
  139. a2,a2
  140.  
  141. CALL
  142. CreateGadgetA,GadT_Base
  143.  
  144. tst.l
  145. d0
  146.  
  147. beq
  148. Free_VInfo
  149.  
  150. move.l  d0,Gad1_3
  151.  
  152.  
  153. ; Nuovo e..precedente
  154.  
  155.  
  156. move.l
  157. Win1_PTR,a0
  158.  
  159. move.l
  160. Gad1_3,a1
  161.  
  162. move.w
  163. #-1,d0
  164.  
  165.  
  166.  
  167. ; Aggiungi in coda!
  168.  
  169. CALL
  170. AddGadget,Int_Base
  171.  
  172.  
  173. move.l
  174. Gad1_1,a0
  175.  
  176. move.l
  177. Win1_PTR,a1
  178.  
  179. suba.l
  180. a2,a2
  181.  
  182. move.w
  183. #-1,d0
  184.  
  185. CALL
  186. RefreshGList,Int_Base
  187.  
  188.  
  189. move.l
  190. Win1_PTR,a0
  191.  
  192. suba.l
  193. a1,a1
  194.  
  195. CALL
  196. GT_RefreshWindow,GadT_Base
  197.  
  198.  
  199. 8<-8<-8<-8<-8<-8<-8<-8<-8<- cut cut cut 8<-8<-8<-8<-8<-8<-8<-8<-
  200.  
  201. Thanks in advance.
  202.  
  203.  
  204.